import java.util.Scanner;

public class Information {
    private String name;
    private int age;

    public void show(){
        System.out.println(name + "," + age + "岁");
    }

    public void setAge(){
        while(true){
            Scanner ageScanner = new Scanner(System.in);
            int ageInput = ageScanner.nextInt();
            if (ageInput < 0 || ageInput > 200){
                System.out.println("请正确输入年龄:");
            } else {
                age = ageInput;
                break;
            }
        }
    }

    public void setName(){
        Scanner nameScanner = new Scanner(System.in);
        name = nameScanner.next();
    }
}
